#include <stdio.h>
#define N 500
int main(void)
{
	int loop,j,start,cp,x;
	int a[N];
	a[N-1]=1;
	start=N-2;
    for (loop=1;loop<=100;loop++){
		cp=0;
		for (j=N-1;j>start;j--){
			x=a[j]*13+cp;
			a[j]=x%10;
			cp=x/10;
		}
		while (cp){
			a[start--]=cp%10;
			cp=cp/10;
		}
	}
    for (loop=start+1;loop<N;loop++)
		printf("%d",a[loop]);
	printf("\n");
	return 0;
}
